package CH8;

/**
 * Created by Cai Ye on 2016/4/24.
 */

import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;

public class HandlerDemo {
    public static void main(String[] args) throws IOException {
        Logger logger = Logger.getLogger(HandlerDemo.class.getName());
        logger.setLevel(Level.WARNING);
        FileHandler handler = new FileHandler("%h/config.log");
        handler.setLevel(Level.FINE);
        logger.addHandler(handler);
        logger.config("Logger 组态完成");
    }
}
